package com.xxl.job.executor.jobhandler;

import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import com.xxl.job.core.log.XxlJobLogger;
import com.xxl.job.executor.service.IStationExShiftStatisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 出口工班流水统计任务
 * @author yzm
 * @since 2020-05-11
 */
@JobHandler(value="StationExShiftStatisHandler")
@Component
public class StationExShiftStatisHandler extends IJobHandler {
    @Autowired
    private IStationExShiftStatisService stationExStatisNewService;

    @Override
    public ReturnT<String> execute(String param) throws Exception {

        XxlJobLogger.log("开始执行[出口工班流水统计]任务");
        stationExStatisNewService.syncRecord();//调用同步数据方法
        XxlJobLogger.log("执行[出口工班流水统计]任务结束");
        return SUCCESS;
    }
}
